home *** CD-ROM | disk | FTP | other *** search
/ BBS in a Box 2 / BBS in a box - Trilogy II.iso / Files / Hyper / U-Z / WindowScript™.Demo / WindowScript™ 1.0 Working Model / WindowScript™ 1.0 Working Model.rsrc / LENS_141_Find.txt < prev    next >
Encoding:
Text File  |  1992-04-29  |  3.6 KB  |  80 lines

  1. # (decoded with TMPL 129)
  2. ItemType: WIND
  3. Rect: 137,99,502,244
  4. Style: Windoid
  5. HasTitleBar: TRUE
  6. HasZoomBox: FALSE
  7. HasCloseBox: TRUE
  8. HasGrowBox: TRUE
  9. MinSize: 365,145
  10. MaxSize: 365,350
  11. Name: Find
  12. Script: -- Example by Alan Pabst, Heizer Software¬¨--on windowEvent  --wdID,wdName,objNo,objName,objValue¬¨if objValue="Open" then ¬¨  wsSet wdID,"userEnter","Text", ""¬¨  wsSet wdID,"path","Text", ""¬¨  wsSet wdID,"8","Value", "0"¬¨  ¬¨  --else if objValue="Close" then ¬¨  ¬¨  --else if objValue="Suspend" then ¬¨  ¬¨  --else if objValue="Resume" then ¬¨  ¬¨  --else if objValue="CloseBox" then ¬¨  ¬¨  --else if objValue="ZoomBox" then ¬¨  ¬¨  --else if objValue="GrowBox" then ¬¨  ¬¨  --else if objValue="TitleBar" then ¬¨  ¬¨end if¬¨¬¨--end windowEvent¬¨¬¨
  13.  
  14. ItemType: PUSH
  15. Rect: 269,113,341,133
  16. Name: Find
  17. DefaultItem: TRUE
  18. Script: --on mouseUp  wdID,wdName,objNo,objName,objValue¬¨put empty into searchFor¬¨put empty into buildList¬¨wsSet wdID,"path","Text", ""¬¨wsSet wdID,"Cancel","Disabled", "true"¬¨get wsGet(wdID,"userEnter","Text")¬¨put it into searchFor¬¨put the number of cards in this stack into x¬¨wsSet wdID,"completed","Max", x¬¨lock screen¬¨if x > 1 then¬¨  put the number of this card into returnPoint¬¨  go to the first card of this stack¬¨end if¬¨wsSet wdID,"8","Value", "1"¬¨find searchFor¬¨if the result is not empty then¬¨  put "No occurrences found..." into buildList¬¨else¬¨  put the id of this card into LoopCheck¬¨  put the foundText&":"&&the short name of this cd&return after buildList ¬¨  go next cd¬¨  put the number of this cd into i¬¨  wsSet wdID,"8","Value", i  ¬¨  put empty into currID¬¨  repeat until currID = LoopCheck¬¨    find searchFor   ¬¨    put the id of this card into currID¬¨    if currID = LoopCheck then ¬¨      exit repeat¬¨      wsSet wdID,"8","Value", x¬¨    end if     ¬¨    put the foundText&":"&&the short name of this cd&return after buildList¬¨    put the number of this cd into i¬¨    wsSet wdID,"8","Value", i  ¬¨    go next cd¬¨  end repeat¬¨end if¬¨wsSet wdID,"8","Value", x¬¨wsSet wdID,"Cancel","Disabled", "false"¬¨wsSet wdID,"path","Text", buildList¬¨if x > 1 then go to card returnPoint¬¨wsSet wdID,"8","Value","0"¬¨unlock screen¬¨¬¨--end mouseUp¬¨
  19.  
  20. ItemType: PUSH
  21. Rect: 161,113,241,133
  22. Name: Cancel
  23. CancelItem: TRUE
  24. AutoClose: TRUE
  25.  
  26. ItemType: TEXT
  27. Rect: 42,16,353,38
  28. Name: userEnter
  29. LockText: FALSE
  30. Script: --on closeField  wdID,wdName,objNo,objName,objValue¬¨--end closeField
  31.  
  32. ItemType: LIST
  33. Rect: 7,55,353,105
  34. AutoSize: FALSE
  35. GrowItem: TRUE
  36. Name: path
  37. Text: 
  38. Logic: Single
  39. Script: --on mouseUp  wdID,wdName,objNo,objName,objValue¬¨put the name of this card into imHere¬¨get wsGet(wdID,"path","selectionText")¬¨if it = empty then ¬¨  ¬¨else if it = "no occurrences found..."  then¬¨  beep¬¨else¬¨  delete word 1 of it¬¨  put it into goTo¬¨  if goTo ‚↠imHere then¬¨    if word 1 of goTo = "card" then ¬¨      go to goTo¬¨    else¬¨      go to card goTo¬¨    end if¬¨  end if¬¨end if¬¨--end mouseUp¬¨¬¨¬¨
  40.  
  41. ItemType: LBL
  42. Rect: 7,43,120,55
  43. TextFont: Geneva
  44. TextSize: 9
  45. Text: All Occurrences Found...
  46.  
  47. ItemType: LBL
  48. Rect: 7,19,42,35
  49. Text: Find:
  50.  
  51. ItemType: PUSH
  52. Rect: 8,113,88,133
  53. Name: Clear
  54. Script: --on mouseUp  wdID,wdName,objNo,objName,objValue¬¨wsSet wdID,"userEnter","Text", ""¬¨wsSet wdID,"path","Text", ""¬¨wsSet wdID,"8","Value", "0"¬¨--end mouseUp
  55.  
  56. ItemType: CNTL
  57. Rect: 24,3,331,12
  58. BlackColor: 0,0,26214
  59. Name: Completed
  60. Style: 320
  61. Min: 0
  62. Max: 2
  63. Value: 0
  64. Step: 1
  65. Leap: 10
  66.  
  67. ItemType: TEXT
  68. Rect: 5,1,24,13
  69. TextFont: Geneva
  70. TextSize: 9
  71. BlackColor: 0,0,26214
  72. Text: 0%
  73.  
  74. ItemType: TEXT
  75. Rect: 331,1,362,13
  76. TextFont: Geneva
  77. TextSize: 9
  78. Name: 100%
  79. BlackColor: 0,0,26214
  80. Text: 100%